//
//  SEGUhomeMediator+SEGSommunitySocial.m
//  SEGBasicBussiness
//
//  Created by 揭婧雯 on 2018/3/22.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGUhomeMediator+SEGSommunitySocial.h"

NSString * const kTargetTopic= @"Topic";
NSString * const kActionTopicInitTopicDetailViewController = @"initTopicDetailViewController";

NSString * const kTargetMarket= @"Market";
NSString * const kActionMarketInitSHRootViewController = @"initSHRootViewController";

NSString * const kTargetNeighbour= @"Neighbour";
NSString * const kActionNeighbourInitNeighbourhoodListViewController = @"initNeighbourhoodListViewController";
NSString * const kActionNeighbourInitNeihborhoodDetailViewController = @"initNeihborhoodDetailViewController";

NSString * const kTargetPGC = @"PGC";
NSString * const kActionkTargetPGCInitPGCDeteailViewController = @"initPGCDeteailViewController";
NSString * const kActionkTargetPGCInitChannelViewController = @"initChannelViewController";
NSString * const kActionkTargetPGCInitTalkSquareViewController = @"initTalkSquareViewController";

NSString * const kActionPersonalHomePageInitSEGPersonalHomePageNewViewController = @"initSEGPersonalHomePageNewViewController";

NSString * const kTargetActivityManage = @"ActivityManage";
NSString * const kActionActivityManageInitActivityRootViewController = @"initActivityRootViewController";
NSString * const kActionActivityManageInitMyParticipatedActivityController = @"initMyParticipatedActivityController";
NSString * const kActionActivityManageGoToActivityDetailViewController = @"goToActivityDetailViewController";
NSString * const kActionActivityManageInitWinRecordListViewController = @"initWinRecordListViewController";
NSString * const kActionActivityManageInitWinRecordDetailViewController= @"initWinRecordDetailViewController";
NSString * const kActionActivityManageInitActivityInvitationViewController = @"initActivityInvitationViewController";
NSString * const kActionActivityManageInitActivityTriggerLotteryViewController = @"initActivityTriggerLotteryViewController";
NSString * const kActionActivityManageInitActivitySignViewController = @"initActivitySignViewController";
NSString * const kActionActivityManageRequestSubmitEventWithEventName = @"requestSubmitEventWithEventName";

NSString * const kActionActivityManageCheckActivityLotteryBubble = @"checkActivityLotteryBubble";
NSString * const kActionActivityManageCheckActivitySignBubble = @"checkActivitySignBubble";
NSString * const kActionActivityManageHiddenActivityLotteryBubble = @"hiddenActivityLotteryBubble";
NSString * const kActionActivityManageHiddenActivitySignBubble = @"hiddenActivitySignBubble";
NSString * const kActionInitActivityCommonDetailViewController = @"initActivityCommonDetailViewController";
NSString * const kActionShowFinishActivityTaskDetailViewController = @"showFinishActivityTaskDetailViewController";
NSString * const kActionInitSignButton = @"getSignButton";



NSString * const kTargetWayCar = @"WayCar";
NSString * const kActionWayCarRootViewController= @"initWayCarRootViewController";

NSString * const kTargetHelp = @"Help";
NSString * const kActionHelpInitHelpRootViewController= @"initHelpRootViewController";

@implementation SEGUhomeMediator (SEGSommunitySocial)

/**
 * 文字话题详情
 * @author Joker
 */
-(UIViewController*)seg_initTopicDetailViewController:(NSDictionary*)params {
    return [self performTarget:kTargetTopic action:kActionTopicInitTopicDetailViewController params:params shouldCacheTarget:NO];
}

/**
 * 集市列表
 * @author Wendy
 */
-(UIViewController*)seg_initMarketListViewController:(NSDictionary*)params{
    return [self performTarget:kTargetMarket action:kActionMarketInitSHRootViewController params:params shouldCacheTarget:NO];
}

/**
 * 邻里圈列表 (2种样式 内部根据平台区分)
 */
- (UIViewController *)seg_initNeighbourhoodListViewController:(NSDictionary *)params {
    return [self performTarget:kTargetNeighbour
                        action:kActionNeighbourInitNeighbourhoodListViewController
                        params:params
             shouldCacheTarget:NO];
}

/**
 * 初始化邻里圈详情 (2种样式 内部根据平台区分)
 */
- (UIViewController *)seg_initNeihborhoodDetailViewController:(NSDictionary *)params {
    return [self performTarget:kTargetNeighbour
                        action:kActionNeighbourInitNeihborhoodDetailViewController
                        params:params
             shouldCacheTarget:NO];
}


/**
 * 活动管理根视图
 * @author Wendy
 */
-(UIViewController*)seg_initActivityManageRootViewController:(NSDictionary*)params{
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitActivityRootViewController params:params shouldCacheTarget:NO];
}

/// 创建我参加的活动列表
/// @param params params
- (UIViewController *)seg_initMyParticipatedActivityController:(NSDictionary *)params {
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitMyParticipatedActivityController params:params shouldCacheTarget:NO];
}

/**
 * 跳转至活动管理详情
 * @author Wendy
 */
-(void)seg_goToActivityManageDetailViewController:(NSDictionary*)params{
    [self performTarget:kTargetActivityManage action:kActionActivityManageGoToActivityDetailViewController params:params shouldCacheTarget:NO];
}

/**
 * 中奖记录列表界面
 * @author Wendy
 */
-(UIViewController*)seg_initWinRecordListViewController:(NSDictionary*)params{
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitWinRecordListViewController params:params shouldCacheTarget:NO];
}

/**
 * 中奖记录详情界面
 * @author Wendy
 */
-(UIViewController*)seg_initWinRecordDetailViewController:(NSDictionary*)params{
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitWinRecordDetailViewController params:params shouldCacheTarget:NO];
}

/**
 * 活动邀请函界面
 * @author Wendy
 */
- (UIViewController*)seg_initActivityInvitationViewController:(NSDictionary*)params{
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitActivityInvitationViewController params:params shouldCacheTarget:NO];
}

/**
 * 活动触发抽奖界面
 * @author Wendy
 */
- (UIViewController*)seg_initActivityTriggerLotteryViewController:(NSDictionary*)params{
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitActivityTriggerLotteryViewController params:params shouldCacheTarget:NO];
}

/**
 * 活动签到界面
 * @author Wendy
 */
- (UIViewController*)seg_initActivitySignViewController:(NSDictionary*)params{
    return [self performTarget:kTargetActivityManage action:kActionActivityManageInitActivitySignViewController params:params shouldCacheTarget:NO];
}


/**
 * 帮帮根视图
 * @author Wendy
 */
-(UIViewController*)seg_initHelpRootViewController:(NSDictionary*)params{
    return [self performTarget:kTargetHelp action:kActionHelpInitHelpRootViewController params:params shouldCacheTarget:NO];
}

/**
 * PGC详情跳转
 * @author Sam
 */
-(UIViewController*)seg_initPGCDeteailViewController:(NSDictionary*)params{
    return [self performTarget:kTargetPGC action:kActionkTargetPGCInitPGCDeteailViewController params:params shouldCacheTarget:NO];
}

/**
 * PGC频道
 * @author Helen
 */
-(UIViewController*)seg_initChannelViewController:(NSDictionary*)params{
    return [self performTarget:kTargetPGC action:kActionkTargetPGCInitChannelViewController params:params shouldCacheTarget:NO];
}

/**
 * 拼车
 * @author Joker
 */
-(UIViewController*)seg_initWayCarRootViewController:(NSDictionary*)params {
    return [self performTarget:kTargetWayCar action:kActionWayCarRootViewController params:params shouldCacheTarget:NO];
}

/**
 * 聊聊广场
 * @author Sam
 */
-(UIViewController*)seg_initTalkSquareViewController:(NSDictionary*)params{
    return [self performTarget:kTargetTopic action:kActionkTargetPGCInitTalkSquareViewController params:params shouldCacheTarget:NO];
}

/**
 * 活动请求
 * @author Sam
 * @param params  跳转参数
 */
- (void)seg_requestSubmitEventWithEventName:(NSDictionary*)params{
    [self performTarget:kTargetActivityManage action:kActionActivityManageRequestSubmitEventWithEventName params:params shouldCacheTarget:NO];
}

/// 获取签到气泡按钮
- (UIButton *)seg_getSignButton {
    return [self performTarget:kTargetActivityManage action:kActionInitSignButton params:nil shouldCacheTarget:NO];;
}

/**
 * 检查是否显示活动抽奖气泡
 * @author Wendy
 * @param params  跳转参数，必传参数 vc:当前视图控制器
 */
- (void)seg_checkActivityLotteryBubble:(NSDictionary*)params{
    [self performTarget:kTargetActivityManage action:kActionActivityManageCheckActivityLotteryBubble params:params shouldCacheTarget:NO];
}

/**
 * 检查是否显示活动签到气泡
 * @author Wendy
 * @param params  跳转参数，必传参数 nav:当前控制器导航栏, view:当前视图
 */
- (void)seg_checkActivitySignBubble:(NSDictionary*)params
{
    [self performTarget:kTargetActivityManage action:kActionActivityManageCheckActivitySignBubble params:params shouldCacheTarget:NO];
}

/**
 * 隐藏活动抽奖气泡
 * @author Wendy
 * @param params  跳转参数
 */
- (void)seg_hiddenActivityLotteryBubble:(NSDictionary*)params
{
    [self performTarget:kTargetActivityManage action:kActionActivityManageHiddenActivityLotteryBubble params:params shouldCacheTarget:NO];
}

/**
 * 隐藏活动签到气泡
 * @author Wendy
 * @param params  跳转参数
 */
- (void)seg_hiddenActivitySignBubble:(NSDictionary*)params
{
    [self performTarget:kTargetActivityManage action:kActionActivityManageHiddenActivitySignBubble params:params shouldCacheTarget:NO];
}

/**
 v1.0.0
 消息回复列表要判断类型，活动的评论跳转活动评论详情
 
 @param params @{@"parentObjId": @""}
 @return activityCommentVC
 */
- (UIViewController *)seg_initActivityCommonDetailViewController:(NSDictionary *)params {
    return [self performTarget:kTargetActivityManage
                        action:kActionInitActivityCommonDetailViewController
                        params:params
             shouldCacheTarget:NO];
}

/// 展示完成活动任务详情列表弹窗
/// @param params 跳转传参
- (void)seg_showFinishActivityTaskDetailViewController:(NSDictionary *)params {
    [self performTarget:kTargetActivityManage
                 action:kActionShowFinishActivityTaskDetailViewController
                 params:params
      shouldCacheTarget:NO];
}

/**
 * 初始化个人资料 -- 新版个人主页
 * @author Helen
 */
-(UIViewController*)seg_initSEGPersonalHomePageNewViewController:(NSDictionary*)params{
    return [self performTarget:kTargetNeighbour action:kActionPersonalHomePageInitSEGPersonalHomePageNewViewController params:params shouldCacheTarget:NO];
}

/**
 * 中奖纪录列表- 任务
 * @author Sam
 */
- (UIViewController*)seg_initMissionRecordListViewController:(NSDictionary*)params {
    return [self performTarget:@"WinningRecord" action:@"initMissionRecordListViewController" params:params shouldCacheTarget:NO];
}

/**
 * 中奖记录详情-任务
 * @author Sam
 */
- (UIViewController*)seg_initMissionRecordDetailViewController:(NSDictionary*)params {
    return [self performTarget:@"WinningRecord" action:@"initMissionRecordDetailViewController" params:params shouldCacheTarget:NO];
}
@end
